<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<link rel="stylesheet" media="screen" type="text/css" href="__THEMES__/style/layout.css" />
		<script type="text/javascript" src="__JS__/jQuery/jquery.js"></script>
		<script type="text/javascript" src="__JS__/jQuery/plugin/troperate.js"></script>
		<script type="text/javascript">
            $(function(){
                /*$('.guestbook_reply').click(function(){
                    var url = $(this).attr('href');
                   	art.dialog.loadCall(url,{
						title : '回复',
						lock : true
					}, false, function(){
						var ic = $('body',parent.document).find('#reply_guestbook_submit');
						var content = ic.find('#content');
						KindEditor.create(content,{
                            items:['fontname','fontsize','textcolor','bgcolor','bold','italic','underline','removeformat','justifyleft','justifycenter','justifyright','insertorderedlist','insertunorderedlist','emoticons','link']
                        });
                        ic.submit(function(){
							$.post("__URL__/insert",ic.serialize(),function(c){
								setAlertBox(c.info, 2);
								if ( c.status === 0 ){
									return false;
								}else{
									window.location.reload();
								}
							},'json');
							return false;
						});
					});
                    return false;
                });*/
            });
        </script>
		<style type="text/css">
			dl.reply                    { border : 1px solid #e1e7f4; background:#f0f5ff; margin:5px; padding : 10px 15px; }
		</style>
	</head>
	<body>
		
		<include file="Public:position" />
		
		<table cellspacing="1" width="100%" class="gr_list">
            <tr style="background: #f0f7ff; font-weight: bold;">
                <td width="20" height="20"></td>
                <td width="60" align="center">编号</td>
                <td align="center">留言人</td>
                <td align="center">留言内容</td>
                <td width="100" align="center">留言时间</td>
                <td width="160" align="center">操作</td>
            </tr>
            <volist id="vo" name="list">
            <tr rel="{$vo['id']}" class="row_color"<?php if( ( $i % 2 ) == 0 ){ ?> bgcolor="#f9f9f9"<?php } ?>>
                <td><input type="checkbox" name="list[]" value="{$vo.id}" /></td>
                <td align="center">{$vo['id']}</td>
                <td align="center">{$vo.username}</td>
                <td>{$vo.content}
                    <?php
                        $s_list = $guestbook_model->where("pid='".$vo['id']."'")->select();
                        if ( !empty( $s_list ) ){
                        	foreach($s_list as $key => $val){
                    ?>
                    <dl class="reply">
                        <dt>{$val.username} 于 {$val.create_time|date=C('DEFAULT_DATE_FORMAT'),###} 回复 {$vo.username}</dt>
                        <dd>{$val.content}</dd>
                    </dl>
                    <?php
                        	}
                        }
                    ?>
                </td>
                <td align="center">{$vo.create_time|date=C('DEFAULT_DATE_FORMAT'),###}</td>
                <td align="center">
                    <a href="{:U('reply?id='.$vo['id'].'&tag='.$_GET['tag'])}" class="guestbook_reply">回复</a><span class="action_line">&nbsp;&nbsp;|&nbsp;&nbsp;</span><a href="{:U('delete',array('id' => $vo['id']))}" class="del_node" rel="{$vo.id}">删除</a>
                </td>
            </tr>
            </volist>
        </table>
        <div class="page">{$page}</div>
	</body>
</html>